<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>BUSQUEDA DE LOCAL</title>
<script src="js/jquery-1.10.2.js"></script>
	<script src="js/jquery-ui-1.10.3.js"></script>
    <script src="js/bootstrap.js"></script>
		
    <!-- Le styles -->
    <link href="css/bootstrap.css" rel="stylesheet">    
    <link href="css/bootstrap-responsive.css" rel="stylesheet">
	<link href="css/bootswatch.css" rel="stylesheet">
	<link href="css/jquery-ui-1.10.3.css" rel="stylesheet">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->


</head>
<body>
<form id="form1" name="form1" method="post" action="LocalBuscarServlet">;
<fieldset>
<table class="table-hover">
  <tbody>
    <tr>
    <th> Nombre de Local:</th>
    
       <th>
       <input type="text" name="txtnombrelocal" id="txtnombrelocal" placeholder="Ingrese Nombre aqui..."/>
       </th> 
    </tr>
        
    <tr>
    <th>
    <button type="submit" class="btn"> BUSCAR </button> 
    </th>
    <th>
    <input type="button" value="Regresar" onclick="window.location='IndexLocal.jsp'" class="btn" />
    </th>
    </tr>
  </tbody>
</table>
</fieldset>
</form>

<table width="550" height="65" border="1" cellpadding="0" cellspacing="0">
  <tr>
    <th width="49" scope="col">Item</th>
    <th width="49" scope="col">ID Local</th>
    <th width="49" scope="col">Nombre</th>
    <th width="192" scope="col">Direccion</th>
    <th width="107" scope="col">Telefono</th>
    <th width="192" scope="col">Correo</th>
    <th width="192" scope="col">Descripcion</th>
    <th width="192" scope="col">ID Administrador</th>
  </tr>

<%@page import="java.util.*, javamusic.modelo.Local" %>
<%
Collection<Local> arreglo = (ArrayList<Local>)request.getAttribute("locales");
if(arreglo != null) { 
int i = 1;
for(Local x : arreglo) {
%>  
  <tr>
    <td><%=i++ %></td>
    <td><% out.print(x.getIdlocal()); %></td>
    <td><% out.print(x.getNombre()); %></td>
    <td><% out.print(x.getDireccion()); %></td>
    <td><% out.print(x.getTelefono()); %></td>
    <td><% out.print(x.getCorreo()); %></td>
    <td><% out.print(x.getDescripcion()); %></td>
    <td><% out.print(x.getIdadministrador()); %></td>
    <td><a href="<%=request.getContextPath() %>/LocalEditarServlet?id=<%=x.getIdlocal() %>">Editar</a> - <a href="<%=request.getContextPath()%>
/LocalEliminarServlet?id=<%=x.getIdlocal()%>" onclick="return confirm('¿Está seguro que desea eliminar');">Eliminar</a></td>
  </tr>    
  </tr>
<% }  
  } %>
  
</table>

  <script src="http://code.jquery.com/jquery-1.10.2.js"></script>
  <script src=”js/bootstrap.js”></script>
  <script>
		$(function() {
			$( "#datepicker" ).datepicker();
		});
  </script>
</body>
</html>